package com.laozhao.deliveryManager.model.entity;

import com.laozhao.deliveryManager.model.AbstractModel;
import com.laozhao.dreamframe.model.DreamDBColumn;

public class MstGoods extends AbstractModel{

	/**
	 * 
	 */
	private static final long serialVersionUID = -1061560954108659021L;
	
	@DreamDBColumn( dbColunName = "CODE")
	public String code;
	@DreamDBColumn( dbColunName = "NAME")
	public String name;
	@DreamDBColumn( dbColunName = "SIZE")
	public String size;
	@DreamDBColumn( dbColunName = "UNIT")
	public String unit;
	@DreamDBColumn( dbColunName = "PRICE")
	public Float price;
	
	public String getCode() {
		return code;
	}
	public void setCode(String code) {
		this.code = code;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public String getSize() {
		return size;
	}
	public void setSize(String size) {
		this.size = size;
	}
	public String getUnit() {
		return unit;
	}
	public void setUnit(String unit) {
		this.unit = unit;
	}
	public Float getPrice() {
		return price;
	}
	public void setPrice(Float price) {
		this.price = price;
	}
//	public Double getAmount() {
//		return amount;
//	}
//	public void setAmount() {
//		this.amount = price *
//	}
//	public void setAmount(Double amount) {
//		this.amount = amount;
//	}
//	
	public String getNameAndSize(){
		StringBuffer nameAndSize = new StringBuffer();
		if (code != null) {
			nameAndSize.append(code);
		}
		if (size != null) {
			nameAndSize.append(size);
		}
		
		return  nameAndSize.toString();
	}
}
